import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import store from '@/vuex/store'
import vueSwiper from 'vue-awesome-swiper' // 引入vue-awesome-swiper
import 'swiper/dist/css/swiper.css' // 引入样式
import wow from 'wowjs'
Vue.prototype.$wow = wow

// import storage from 'good-storage' 缓存插件  在哪用放哪里

Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.use(store)
Vue.use(vueSwiper)
// Vue.use(animated)
router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
